<table class="layui-table text-center" lay-size="sm">
    <thead>
        <tr>
            <th><input type="checkbox" class="checked-all" target="channel-order-id"></th>
            <th><div class="text-left">账号</div></th>
            <th><div class="text-left">订单号</div></th>
            <th><div class="text-left">渠道</div></th>
            <th><div class="text-left">收件人</div></th>
            <th>国家</th>
            <th><div class="text-left">追踪号</div></th>
            <th>物流状态</th>
            <th>数量</th>
            <th>重量</th>
            <th>价格</th>
            <th>是否取消</th>
            <th>面单</th>
            <th><div class="text-left">申报时间</div></th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        {volist name="list" id="item"}
            <tr>
                <td><input type="checkbox" class="channel-order-id" name="ch_id[]" value="{$item.ch_id}"></td>
                <td class="text-left copy-text">{$item.order.account.username}</td>
                <td class="text-left copy-text">{$item.order.order_sn}</td>
                <td class="text-left">{$item.channel.channel_name}</td>
                <td class="text-left copy-text">{$item.order.consignee?:$item.order.buyer_first_name}</td>
                <td>{$item.country.name_ch}</td>
                <td class="text-left copy-text">{$item.track_num}</td>
                <td>
                    <span {if in_array($item->getData('track_status'), $exception)}class="layui-badge"{/if}>{$item.track_status}</span>
                </td>
                <td>{$item.order.total_qty}</td>
                <td>{$item.weight?$item.weight.' 克':''}</td>
                <td>{$item.logistics_price|abs}</td>
                <td>
                    <span class="{$item.is_cancel?'text-yellow':'text-muted'}"><i class="fa fa-circle"></i> {$item.is_cancel?'是':'否'}</span>
                </td>
                <td>{if !empty($item.label_url)}<a href="{$item.label_url}" target="_blank"><i class="fa fa-file-pdf-o"></i></a> {/if}</td>
                <td class="text-left">{$item.create_time}</td>
                <td class="text-left">
                    {if !empty($item.track_num) && $is_show_label && in_array($item->getData('track_status'), [$track_status_wait, $track_status_none])}
                        <a href="{:url('label',['ids'=>$item['ch_id']])}" title="获取面单" class="layui-btn layui-btn-xs layui-bg-blue ajax-get">获取面单</a>
                    {/if}
                    {if !empty($item.track_info) && $item->getData('track_status') > $track_status_none}
                        <a href="{:url('info',['ch_id'=>$item['ch_id']])}" title="物流信息" width-form="60%" height-form="60%" class="layui-btn layui-btn-xs layui-bg-green ajax-form">查看物流</a>
                    {elseif !empty($item.track_num)}
                        <a target="_blank" class="layui-btn layui-btn-xs layui-bg-green" href="https://t.17track.net/zh-cn#nums={$item.track_num}">查看物流</a>
                    {/if}
                    {if !empty($item.track_num) && !$item.is_cancel && !in_array($item->getData('track_status'), $in_track_status)}
                        <a href="{:url('track',['ids'=>$item['ch_id']])}" class="layui-btn layui-btn-xs layui-btn-warm ajax-get">拉取物流</a>
                    {/if}
                    {if !$item.is_cancel && $item->getData('track_status') == $track_status_wait}
                        <a href="{:url('cancel',['ch_id'=>$item['ch_id']])}" title="取消申报" confirm="1" class="layui-btn layui-btn-xs layui-bg-cyan ajax-get">取消申报</a>
                    {/if}
                    {if in_array($item->getData('track_status'), [$track_status_nomapping, $track_status_none, $track_status_wait]) && $is_show_delete}
                        <a href="{:url('delete',['ids'=>$item['ch_id']])}" title="删除" confirm="1" class="layui-btn layui-btn-xs layui-btn-danger ajax-get">删除</a>
                    {/if}
                </td>
            </tr>
        {/volist}
        {empty name="list"}
        <tr>
            <td colspan="14">没有数据</td>
        </tr>
        {/empty}
    </tbody>
</table>
<div class="page">
    {$page|raw}
</div>